/*
 * @Author: weikang
 * @Description:
 * @Date: 2023-12-30 17:13:02
 * @LastEditTime: 2023-12-30 17:15:58
 * @FilePath: \env-manager-pc\src\store\tools\index.ts
 */
// 循环一个数组，返回一个新数组,并设置父级ID
export function mapArrayAddParentId<T>(arr: T[], parent: any): T[] {
  const newArr: T[] = []
  for (const item of arr) {
    newArr.push({ ...item, ParentId: parent.ObjID })
  }
  return newArr
}
